package com.ruoyi.order.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.order.mapper.TOrderShortMapper;
import com.ruoyi.order.domain.TOrderShort;
import com.ruoyi.order.service.ITOrderShortService;

/**
 * 短token订单Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-02-09
 */
@Service
public class TOrderShortServiceImpl implements ITOrderShortService 
{
    @Autowired
    private TOrderShortMapper tOrderShortMapper;

    /**
     * 查询短token订单
     * 
     * @param id 短token订单主键
     * @return 短token订单
     */
    @Override
    public TOrderShort selectTOrderShortById(Long id)
    {
        return tOrderShortMapper.selectTOrderShortById(id);
    }

    /**
     * 查询短token订单列表
     * 
     * @param tOrderShort 短token订单
     * @return 短token订单
     */
    @Override
    public List<TOrderShort> selectTOrderShortList(TOrderShort tOrderShort)
    {
        return tOrderShortMapper.selectTOrderShortList(tOrderShort);
    }

    /**
     * 新增短token订单
     * 
     * @param tOrderShort 短token订单
     * @return 结果
     */
    @Override
    public int insertTOrderShort(TOrderShort tOrderShort)
    {
        tOrderShort.setCreateTime(DateUtils.getNowDate());
        return tOrderShortMapper.insertTOrderShort(tOrderShort);
    }

    /**
     * 修改短token订单
     * 
     * @param tOrderShort 短token订单
     * @return 结果
     */
    @Override
    public int updateTOrderShort(TOrderShort tOrderShort)
    {
        return tOrderShortMapper.updateTOrderShort(tOrderShort);
    }

    /**
     * 批量删除短token订单
     * 
     * @param ids 需要删除的短token订单主键
     * @return 结果
     */
    @Override
    public int deleteTOrderShortByIds(Long[] ids)
    {
        return tOrderShortMapper.deleteTOrderShortByIds(ids);
    }

    /**
     * 删除短token订单信息
     * 
     * @param id 短token订单主键
     * @return 结果
     */
    @Override
    public int deleteTOrderShortById(Long id)
    {
        return tOrderShortMapper.deleteTOrderShortById(id);
    }
}
